﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/index.Master" CodeBehind="SpravaSkupin.aspx.cs" Inherits="Fotobanka.SpravaSkupin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Obsah" runat="server">
    <asp:DropDownList ID="skupiny" runat="server" DataSourceID="ObjectDataSource1" 
        DataTextField="Name" DataValueField="Id" style="margin-left: 0px">
    </asp:DropDownList>
    <asp:Button ID="addButton" runat="server" BorderColor="Black" BorderWidth="1px" 
        Text="Přidat skupinu" onclick="addButton_Click" /><br />
    <asp:Label ID="errors" runat="server" ForeColor="Red"></asp:Label>
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataSourceID="ObjectDataSource2" ForeColor="#333333" 
        GridLines="None" DataKeyNames="Id" onrowdatabound="GridView1_RowDataBound">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Jméno" SortExpression="Name" />
            <asp:BoundField DataField="Description" HeaderText="Popis" 
                SortExpression="Description" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        DeleteMethod="DeleteGroupFromGallery" SelectMethod="SelectGalleryGroups" 
        TypeName="Fotobanka.GalleriesManager">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="id" 
                PropertyName="SelectedValue" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="id" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="SelectUserGroups" TypeName="Fotobanka.GroupManager">
    </asp:ObjectDataSource>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Ovladaci_panel" runat="server">
</asp:Content>
